﻿using System;
using System.Data;
using System.Data.SqlClient;

public class EmpData
{
    public EmpData()
    {
        //
        // TODO: Add constructor logic here
        //
    }
    public static DataTable GetEmp()
    {
        DataTable empDt = new DataTable();
        SqlConnection conn = new SqlConnection();
        conn.ConnectionString = "server=(local);database=Adhocreporting;user id=sa; password=sa123;";
        SqlDataAdapter adp = new SqlDataAdapter();
        adp.SelectCommand = new SqlCommand("select * from emp", conn);
        adp.Fill(empDt);
        return empDT;
    }
}
